home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 352_01.zip / VLISTEQ.CPP < prev    next >
C/C++ Source or Header  |  1993-04-10  |  557b  |  28 lines

  1. //VLISTEQ.CPP
  2. //    routine for Vlist::operator=() and copy constructor.
  3. #include "dblib.h"
  4.  
  5. Vlist& Vlist::operator=( Vlist& a )
  6.     {
  7.     this->clear();                // remove current contents of Vlist. 
  8.     this->push ( a );            // 
  9.     return *this;
  10.     }
  11.     
  12. Vlist::Vlist (Vlist& a)    // copy constructor
  13.     {
  14.     this-> clear();
  15.     this-> push(a);    
  16.     }
  17.     
  18. void Vlist::push ( Vlist& a )
  19.     {
  20.     int an = a.n;
  21.     void **al=a.list;
  22.     for ( int i=0; i<an; ++i )
  23.         {
  24.         this-> push ( al[i] );
  25.         } 
  26.     }    
  27.     
  28. //--------------------- end VLISTEQ.CPP -------------------------------------